<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Print out a PHP class definition for a dispatchable interface</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="function.com-message-pump.html">« com_message_pump</a></li>
      <li style="float: right;"><a href="function.variant-abs.html">variant_abs »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="ref.com.html">COM 函数</a></li>
    <li>Print out a PHP class definition for a dispatchable interface</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="function.com-print-typeinfo" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">com_print_typeinfo</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.2.0, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">com_print_typeinfo</span> &mdash; <span class="dc-title">Print out a PHP class definition for a dispatchable interface</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.com-print-typeinfo-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>com_print_typeinfo</strong></span>(<span class="methodparam"><span class="type"><span class="type"><a href="class.variant.html" class="type variant">variant</a></span>|<span class="type">string</span></span> <code class="parameter">$variant</code></span>, <span class="methodparam"><span class="type">?</span><span class="type"><span class="type">string</span><span class="type"></span></span> <code class="parameter">$dispatch_interface</code><span class="initializer"> = <strong><code>null</code></strong></span></span>, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$display_sink</code><span class="initializer"> = <strong><code>false</code></strong></span></span>): <span class="type">bool</span></div>

  <p class="para rdfs-comment">
   The purpose of this function is to help generate a skeleton class for use
   as an event sink.  You may also use it to generate a dump of any COM
   object, provided that it supports enough of the introspection interfaces,
   and that you know the name of the interface you want to display.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.com-print-typeinfo-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt>
<code class="parameter">variant</code></dt>

     <dd>

      <p class="para">
       <code class="parameter">variant</code> should be either an instance of a COM
       object, or be the name of a typelibrary (which will be resolved according
       to the rules set out in <span class="function"><a href="function.com-load-typelib.html" class="function">com_load_typelib()</a></span>).
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">dispatch_interface</code></dt>

     <dd>

      <p class="para">
       The name of an <code class="literal">IDispatch</code> descendant interface that you want to display.
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">display_sink</code></dt>

     <dd>

      <p class="para">
       If set to <strong><code>true</code></strong>, the corresponding sink interface will be displayed
       instead.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.com-print-typeinfo-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   成功时返回 <strong><code>true</code></strong>， 或者在失败时返回 <strong><code>false</code></strong>。
  </p>
 </div>

 <div class="refsect1 seealso" id="refsect1-function.com-print-typeinfo-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.com-event-sink.html" class="function" rel="rdfs-seeAlso">com_event_sink()</a> - Connect events from a COM object to a PHP object</span></li>
    <li class="member"><span class="function"><a href="function.com-load-typelib.html" class="function" rel="rdfs-seeAlso">com_load_typelib()</a> - 载入 Typelib</span></li>
   </ul>
  </p>
 </div>

</div></div></div></body></html>